package singleCase;

/**
 * 单例模式测试类
 */
public class SingleTest {

    public static void main(String[] args) {
        final LazySingle single=LazySingle.getSingleton();
        for (int i = 0; i <10 ; i++) {
            new Thread(new Runnable() {
                public void run() {
                    System.out.println(Thread.currentThread().getName()+(single==LazySingle.getSingleton()));
                }
            },"thread"+i).start();
        }
    }
}
